package com.thinkcube.edutainment.domain.data;

import java.util.ArrayList;
import java.util.List;

import android.os.Parcel;
import android.os.Parcelable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class PostItemData implements Parcelable {

	@JsonProperty("post")
	PostData postData;
	@JsonProperty("childs")
	List<PostData> clidPostDataList;

	public PostData getPostData() {
		return this.postData;
	}

	public void setPostData(PostData postData) {
		this.postData = postData;
	}

	public List<PostData> getClidPostDataList() {
		return this.clidPostDataList;
	}

	public void setClidPostDataList(List<PostData> clidPostDataList) {
		this.clidPostDataList = clidPostDataList;
	}

	protected PostItemData(Parcel in) {
		postData = (PostData) in.readValue(PostData.class.getClassLoader());
		clidPostDataList = new ArrayList<PostData>();
		in.readList(clidPostDataList, null);
	}

	public PostItemData() {
	}

	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeValue(postData);
		dest.writeList(clidPostDataList);
	}

	public static final Parcelable.Creator<PostItemData> CREATOR = new Parcelable.Creator<PostItemData>() {
		public PostItemData createFromParcel(Parcel in) {
			return new PostItemData(in);
		}

		public PostItemData[] newArray(int size) {
			return new PostItemData[size];
		}
	};
}